package ui20131001.service
{
	import ui20131001.helper.IndividualUsersController;
	import ui20131001.helper.IndividualUsersService;

	/**
	 * @author : LIMIN
	 * @time : 下午08:20:51
	 * 
	 * @remarks :
	 */
	
	public class IndiCurrPositionDataCmd extends IndiGetPositionDataCmd
	{
		private var _deviceId:String;
		
		public function IndiCurrPositionDataCmd(callback:Function, device_id:String)
		{
			super(callback);
			_deviceId = device_id;
		}
		
		override public function execute():void
		{
			var eDateObject:Date = new Date(Global.systemTime);
			var bDateObject:Date = new Date(eDateObject.getTime() - 24*60*60*1000);
			
			IndividualUsersService.getPositionData(onResponse, 
				_deviceId,
				bDateObject.getFullYear()+"-"+(bDateObject.getMonth()+1)+"-"+bDateObject.getDate(), 
				bDateObject.getHours()+"", 
				bDateObject.getMinutes()+"", 
				eDateObject.getFullYear()+"-"+(eDateObject.getMonth()+1)+"-"+eDateObject.getDate(), 
				eDateObject.getHours()+"", 
				eDateObject.getMinutes()+""
			);
		}
		
	}
}